package com.wxx.service.impl;

import com.wxx.service.DubboBaseService;
import org.apache.dubbo.config.annotation.Service;

@Service
public class DubboServiceImpl implements DubboBaseService {
    public String methodA() {
        System.out.println("this is Service A");
        sleep();

        return "success A";
    }

    public String  methodB() {
        System.out.println("this is Service B");
        sleep();

        return "success B";
    }


    public String methodC() {
        System.out.println("this is Service C");
        sleep();

        return "success C";
    }

    private void sleep() {
        int random = (int)(Math.random() * 100);
        try {
            Thread.sleep(random);
        } catch (Exception e) {

        }
    }
}
